package com.mvvm.store.ui.login;

import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.view.View;

import com.leo.utilspro.utils.KeyBoardUtils;
import com.mvvm.store.R;
import com.mvvm.store.base.BaseActivity;
import com.mvvm.store.databinding.ActivityLoginBinding;
import com.mvvm.store.ui.MainActivity;

import io.reactivex.Observable;

public class LoginActivity extends BaseActivity<LoginViewModel, ActivityLoginBinding> {
    @Override
    protected int getContentViewId() {
        return R.layout.activity_login;
    }
    private Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            if (binding.editPhone == null) {
                return;
            }
            switch (msg.what) {
                case 11:
                    KeyBoardUtils.openKeybord(binding.editPassworld);
                    break;
            }
        }
    };
    @Override
    protected void processLogic() {
        binding.smartLoadingView.setSmartClickable(false);

    }

    @Override
    protected void setListener() {
        binding.smartLoadingView.setOnClickListener(v1 -> {
            Intent intent=new Intent(LoginActivity.this, MainActivity.class);
            startActivity(intent);
        });
    }

    @Override
    public void onClick(View v) {

    }
}
